from django.core.files.storage import Storage
from django.utils.deconstruct import deconstructible

from meiduo_mall import settings


@deconstructible
class MyStorage(Storage):


    # def __init__(self, option=None):
    #     if not option:
    #         option = settings.CUSTOM_STORAGE_OPTIONS

    def _open(self, name, mode='rb'):
        pass
    def _save(self, name, content, max_length=None):
        pass

    def url(self, name):

        #name =  file_id
        return  settings.FDFS_BASE_URL + name